import { Component, OnInit } from '@angular/core';
import {HttpClient} from '@angular/common/http';

@Component({
  selector: 'app-user-list',
  templateUrl: './user-list.component.html',
  styleUrls: ['./user-list.component.css']
})
export class UserListComponent implements OnInit {
  userList = [];
  constructor(
    private http: HttpClient
  ) { }

  ngOnInit() {
    this.getUserList();
  }
  getUserList() {
    this.http.get(localStorage.getItem('url') + 'findAllByIfDelete').subscribe( v => {
      if (v['code'] === 0) {
        console.log(v);
        this.userList = v['data'];
    }
    });
  }
}
